﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.ComponentModel.DataAnnotations;

namespace BindToolkit.DataAnnotations
{
    [DataContract]
    public class ValidationErrorInfo
    {
        public ValidationErrorInfo()
        {
        }
        public ValidationErrorInfo(ValidationResult vr)
        {
            Members = vr.MemberNames;
            Error = vr.ErrorMessage;

        }
        [DataMember]
        public IEnumerable<string> Members { get; set; }
        [DataMember]
        public string Error { get; set; }
    }
}
